package com.exmaple.springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author weiHuang.zhu
 * @Date 15/4/2023 下午9:58
 */
@RestController
public class OrderZkController {
    public static final String INVOKE_EURL = "http://cloud-provider-payment";
    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/consumer/payment/zk")
    public String getRes(){
        return restTemplate.getForObject(INVOKE_EURL+"/zookeeper", String.class);
    }
}
